﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }
       
        private void Form2_Load(object sender, EventArgs e)
        {
           
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var uName = textBox1.Text;
            var uPwd = textBox2.Text;
            var rPwd = textBox3.Text;
            var abc = string.IsNullOrEmpty(uName);
            var abcc = string.IsNullOrEmpty(uPwd);
            var abcd = uPwd == rPwd;
            if (!abc&&!abcc&&abcd)
            {
                MessageBox.Show("恭喜你，注册成功", "注册成功");
                Form1.userd.Add(uName,uPwd);
                this.Close();

            }
            else
            {
                MessageBox.Show("对不起，注册失败", "注册失败");
            }
        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {
          
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();

        }
    }
}
